
	var checkoutSubmit = document.querySelector(".checkoutSubmit-info-content-static");
document.onscroll = function(){
	var scrolltop= document.documentElement.scrollTop
	var checkoutSubmitBottom = checkoutSubmit.offsetTop+checkoutSubmit.offsetHeight;
	// console.log(scrolltop)
	if(scrolltop <= checkoutSubmitBottom){
		$(".checkoutSubmit-info-content-static").css({
			position:"fixed",
			bottom:0,
		});
	}else if(scrolltop > checkoutSubmitBottom){
		checkoutSubmit.style.position="static";
		// $(".checkoutSubmit-info-content-static").css({
		// 	position:"static",
		// })
	}
	
	
}
$("body").on('click','.usr-li-text',function(){
	$(".cover").css("display","block")
})

$("body").on('click','.edit',function(){
	$(".cover").css("display","block")
})


$(".btn2").click(function(){
	$(".cover").css("display","none")
})
$(".header-right").click(function(){
	$(".cover").css("display","none")
})



$(".btn1").click(function(){
	var username = $("#12").val()
	var address1 = $("#13 option:selected").text();
	
	var address2 = $("#14").val()
	var address3 = $("#15").val()	
	var address4 = $("#16").val()
	var modphoto = $("#17").val()
	var photo = $("#18").val()
	var ema = $("#19").val()
	var html = '';
	html +='<div class="userShippingAddress-li clear-fix"><span class="module-userShippingAddress-li-name">'+ username +'</span><a class="module-userShippingAddress-li-address">'+ address1 + ' '+ address2 +' '+ address3 +' '+ address4 +'</a><span class="module-userShippingAddress-li-mobile">'+ modphoto +'</span><span class="module-userShippingAddress-li-zipCode">'+ ema +'</span><span class="module-userShippingAddress-li-control fr"><a class="edit">编辑</a><a class="deel">删除</a></span></div>'

	$(".useradress").html(html)
	$(".cover").css("display","none")
})

new PCAS("13", "14", "15");
$("body").on('click','.deel',function(){
	$(this).parent().parent().remove()
	var text='';
	text+='<div class="userShippingAddress-li"><span class="usr-li-text">+ 新建收货地址</span></div>'
	$(".useradress").html(text)

})
	
